export const bookDataConfig = {
  fields: [
    {
      label: 'ISBN',
      prop: 'isbn',
      minWidth: 100
    },
    {
      label: '书名',
      prop: 'name',
      minWidth: 150
    },
    {
      label: '出版社',
      prop: 'press',
    },
    {
      label: '定价',
      prop: 'price',
      width: 80
    },
    {
      label: '折扣',
      prop: 'discount',
      width: 50
    },
    {
      label: '进价',
      prop: 'purchase_price',
      width: 80
    },
    {
      label: '供应商',
      prop: 'supplier',
    },
    {
      label: '库位',
      prop: 'position',

    },
    {
      label: '库存',
      prop: 'stock',
      minWidth: 30
    }
  ],
  dialogForm: {
    name: '',
    isbn: '',
    press: '',
    price: '',
    discount: '',
    purchase_price: '',
    supplier: '',
    supplier_id: 0,
    stock: '',
    count: 1,
    store: 'kongfz',
    position: ''
  },
  filterForm: {
    key: ''
  }
}

export const orderDataConfig = {
  fields: [
    {
      label: 'ID',
      prop: 'id',
      width: 80
    },
    {
      label: 'ISBN',
      prop: 'isbn',
      minWidth: 100
    },
    {
      label: '书名',
      prop: 'name',
      minWidth: 150
    },
    {
      label: '出版社',
      prop: 'press',
    },
    {
      label: '供应商',
      prop: 'supplier',
    },
    {
      label: '定价',
      prop: 'price',
      width: 80
    },
    {
      label: '折扣',
      prop: 'discount',
      width: 50
    },
    {
      label: '进价',
      prop: 'purchase_price',
      width: 80
    },

    {
      label: '库位',
      prop: 'position',

    },
    {
      label: '库存',
      prop: 'stock',
      minWidth: 50
    },
    {
      label: '订数',
      prop: 'count',
      width: 50
    },
    {
      label: '状态',
      prop: 'status',
    },
    {
      label: '店铺类型',
      prop: 'store',
    },
    {
      label: '更新时间',
      prop: 'update_time',
      minWidth: 100
    }
  ],
  filterForm: {
    isbn: '',
    supplier_id: '',
    name: '',
    press: '',
    store: '',
    status: '',
    create_time: '',
    update_time: ''
  },
  dialogForm: {
    id: '',
    name: '',
    isbn: '',
    press: '',
    price: '',
    discount: '',
    purchase_price: '',
    supplier: '',
    supplier_id: 0,
    stock: '',
    count: 1,
    store: 'kongfz',
    position: ''
  },
  pickerOptions: {
    shortcuts: [
      {
        text: "最近一周",
        onClick(picker) {
          const end = new Date();
          const start = new Date();
          start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
          picker.$emit("pick", [start, end]);
        },
      },
      {
        text: "最近一个月",
        onClick(picker) {
          const end = new Date();
          const start = new Date();
          start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
          picker.$emit("pick", [start, end]);
        },
      },
      {
        text: "最近三个月",
        onClick(picker) {
          const end = new Date();
          const start = new Date();
          start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
          picker.$emit("pick", [start, end]);
        },
      },
    ],
  },
}